﻿using System;
using System.Xml.Serialization;

namespace Whois.API.Model
{
    /// <summary>
    /// Represents the WHOIS data retrieved from the XML API service
    /// </summary>
    [Serializable, XmlRoot("WhoisRecord")]
    public class WhoisRecord : ModelBase
    {
        [XmlElement(ElementName = "estimatedDomainAge")]
        public Int32 EstimatedDomainAge { get; set; }

        [XmlElement(ElementName = "domainNameExt")]
        public string DomainNameExt { get; set; }

        [XmlElement(ElementName = "createdDate")]
        public string CreatedDate { get; set; }

        [XmlElement(ElementName = "updatedDate")]
        public string UpdatedDate { get; set; }

        [XmlElement(ElementName = "expiresDate")]
        public string ExpiresDate { get; set; }

        [XmlElement(ElementName = "header")]
        public string Header { get; set; }

        [XmlElement(ElementName = "footer")]
        public string Footer { get; set; }

        [XmlElement(ElementName = "domainName")]
        public string DomainName { get; set; }

        [XmlElement(ElementName = "registryData")]
        public RegistryData RegistryData { get; set; }

        [XmlElement(ElementName = "registrarName")]
        public String RegistrarName { get; set; }

        [XmlElement(ElementName = "nameServers")]
        public NameServers NameServers { get; set; }

        #region Contacts
        [XmlElement(ElementName = "registrant")]
        public Contact Registrant { get; set; }

        [XmlElement(ElementName = "administrativeContact")]
        public Contact AdministrativeContact { get; set; }

        [XmlElement(ElementName = "technicalContact")]
        public Contact TechnicalContact { get; set; }

        [XmlElement(ElementName = "zoneContact")]
        public Contact ZoneContact { get; set; }
        #endregion
    }
}
